package org.bjf.modules.process.constants;

/**
 * @author bjf
 */

public enum EnumAuditStatus {
  SUBMIT(0, "提交"),
  AGREE(1, "同意"),
  REJECT(2, "拒绝");

  private Integer code;
  private String desc;

  EnumAuditStatus(Integer code, String desc) {
    this.code = code;
    this.desc = desc;
  }


  public static EnumAuditStatus of(int code) {
    for (EnumAuditStatus value : EnumAuditStatus.values()) {
      if (value.getCode().equals(code)) {
        return value;
      }
    }
    return null;
  }


  public Integer getCode() {
    return code;
  }

  public String getDesc() {
    return desc;
  }
}
